package com.hoperun.service;

import java.util.List;

import com.hoperun.bean.AdminOrganizations;
import com.hoperun.bean.AdminOrganizationsManager;
import com.hoperun.framework.ibatis.page.BootGrid;
import com.hoperun.framework.ibatis.page.BootGridPage;
import com.hoperun.framework.query.Criteria;

public interface IAdminOrganizationsManagerSV {
	/**
	 * 根据主键查询
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public AdminOrganizationsManager queryById(Long id) throws Exception;

	/**
	 * 添加
	 * 
	 * @param adminOrganizationsManager
	 * @return
	 * @throws Exception
	 */
	public List<AdminOrganizationsManager> createBind(String oids, String mids)
			throws Exception;

	/**
	 * 添加
	 * 
	 * @param adminOrganizationsManager
	 * @return
	 * @throws Exception
	 */
	public void deleteBindManager(String mids) throws Exception;

	/**
	 * 添加
	 * 
	 * @param adminOrganizationsManager
	 * @return
	 * @throws Exception
	 */
	public AdminOrganizationsManager save(
			AdminOrganizationsManager adminOrganizationsManager)
			throws Exception;

	/**
	 * 更新
	 * 
	 * @param adminOrganizationsManager
	 * @throws Exception
	 */
	public void update(AdminOrganizationsManager adminOrganizationsManager)
			throws Exception;

	/**
	 * 物理删除
	 * 
	 * @param id
	 * @throws Exception
	 */
	public void delete(Long id) throws Exception;

	/**
	 * 新增或删除
	 * 
	 * @param adminOrganizationsManager
	 * @throws Exception
	 */
	public void saveOrUpdate(AdminOrganizationsManager adminOrganizationsManager)
			throws Exception;

	/**
	 * 新增或删除
	 * 
	 * @param list
	 * @throws Exception
	 */
	public void saveOrUpdate(List<AdminOrganizationsManager> list)
			throws Exception;

	/**
	 * 按条件查询记录
	 * 
	 * @param criteria
	 * @throws Exception
	 */
	public List<AdminOrganizationsManager> queryByCondition(Criteria criteria)
			throws Exception;

	/**
	 * 按条件查询记录条数
	 * 
	 * @param criteria
	 * @throws Exception
	 */
	public int queryCountByCondition(Criteria criteria) throws Exception;

	/**
	 * 分页查询
	 * 
	 * @param criteria
	 * @return
	 * @throws Exception
	 */
	public BootGridPage<AdminOrganizationsManager> queryPage(Criteria criteria,
			BootGrid<AdminOrganizationsManager> grid) throws Exception;

	/**
	 * 按条件查询记录记录
	 * 
	 * @param criteria
	 * @throws Exception
	 */
	public List<AdminOrganizationsManager> queryBySpecificCondition(
			Criteria criteria) throws Exception;

	/**
	 * 按条件查询记录条数
	 * 
	 * @param criteria
	 * @throws Exception
	 */
	public int queryCountBySpecificCondition(Criteria criteria)
			throws Exception;

	/**
	 * 分页查询
	 * 
	 * @param criteria
	 * @return
	 * @throws Exception
	 */
	public BootGridPage<AdminOrganizationsManager> querySpecificPage(
			Criteria criteria, BootGrid<AdminOrganizationsManager> grid)
			throws Exception;

	/**
	 * 根据用户Id获取最高级的用户组织机构
	 * 
	 * @param managerId
	 * @return
	 * @throws Exception
	 */
	public List<AdminOrganizations> queryManagerMaxOrganization(Long managerId,
			Long orgId) throws Exception;
}
